<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 董胜涛
  Date: 2022/3/1
  Time: 19:15
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<form action="${pageContext.request.contextPath}/batchDelete.do">
<table border="1" cellspacing="0" cellpadding="5">
    <tr>
        <td><input type="submit" value="批量删除"/></td>
        <td>学号</td>
        <td>性别</td>
        <td>年龄</td>
        <td>姓名</td>
        <td>电话</td>
        <td>操作</td>

    </tr>
    <c:forEach items="${requestScope.pageInfo.list}" var="stu">
        <tr>
            <td><input type="checkbox" value="${stu.id}" name="ids"></td>
            <td>${stu.id}</td>
            <td>${stu.gender}</td>
            <td>${stu.age}</td>
            <td>${stu.name}</td>
            <td>${stu.tel}</td>
            <td><a href="${pageContext.request.contextPath}/selectById.do?str=${stu.id}">修改</a><a href="${pageContext.request.contextPath}/delete.do?id=${stu.id}">删除</a></td>
        </tr>
    </c:forEach>
    <tr>
        <td colspan="7"><a href="${pageContext.request.contextPath}/add.jsp">添加</a></td>
    </tr>
</table>
</form>
    <c:if test="${requestScope.pageInfo.hasPreviousPage}">
        <a href="${pageContext.request.contextPath}/selectAll.do?curpage=${requestScope.pageInfo.prePage}">上一页</a>
    </c:if>
<c:if test="${requestScope.pageInfo.hasNextPage}">
    <a href="${pageContext.request.contextPath}/selectAll.do?curpage=${requestScope.pageInfo.nextPage}">下一页</a>
</c:if>

</body>
</html>
